Developer Guide (API Reference) > Command Line API > Usage & Examples for convert2swfclient.jar |
Copy Code
|
|
---|---|
java -jar /path/to/convert2swfclient.jar argument1=value1 argument2=value2 ... |
The argument list and parameter values are described in ProxyWebService Parameters.
Before you run the samples, verify the following:
Example 1:
To convert sample.doc to sample.swf located in the same directory as sample.doc:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.doc |
Example 2:
To convert page 1 of sample.doc to sample.swf:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar pages=1 source=c:\tempcache\sample.doc |
Example 3:
To convert pages 1, 5 and 7 only of sample.doc to sample.swf:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar pages=1;5;7 source=c:\tempcache\sample.doc |
Example 4:
To get total pages count in sample.doc:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.doc totalpages |
Example 5:
To get fast page count in sample.doc:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.doc fastpgcnt |
fastpgcnt parameter gets the total pages in the document quickly, but may not be as accurate as totalpages. |
Example 6:
To convert sample.doc to sample.swf and add watermark “Draft Only”:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.doc wtmtext="Draft Only" wtmfont= Helvetica wtmsize=100 wtmalpha=10 |
Example 7:
To create a thumbnail PNG of page 1 of sample.doc:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.doc thumbnail=100x100 pages=1 |
Example 8:
To create a thumbnail PNGs of all pages of sample.doc:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=sample.doc thumbnail=100x100 |
Example 9:
To create a thumbnail of page 6 of sample.doc, specify target location, and add watermark “Approved” on each thumbnail:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.doc target=c:\tempcache\ thumbnail=100x100 wtmtext=Approved wtmfont=Helvetica wtmsize=50 wtmalpha=70 |
Example 10:
To convert sample.doc to separate swf files for each page:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.doc enterprise=1 |
Example 11:
To convert sample.tiff to sample.png:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.tiff target=c:\tempcache\sample.png |
Example 12:
To convert page 1 only of sample.pdf to sample.png:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.pdf target=c:\tempcache\sample.png pages=1 |
Example 13:
To get total pages count in sample.pdf:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.pdf totalpages |
Example 14:
To get fast page count in sample.pdf:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.pdf totalpages |
fastpgcnt parameter gets the number of pages in the document quickly, but may not be as accurate as totalpages. |
Example 15:
To convert sample.tiff to sample.png and add watermark “Confidential”:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.tiff target=c:\tempcache\sample.png wtmtext=Confidential wtmfont= Helvetica wtmsize=100 wtmalpha=10 |
Example 16:
To create a thumbnail of page 1 of sample.tiff:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.tiff target=c:\tempcache\sample.png thumbnail=100x100 pages=1 |
Example 17:
To create a thumbnail of all pages of sample.tiff:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.tiff target=c:\tempcache\sample.png thumbnail=100x100 |
Example 18:
To create a thumbnail of page 6 of sample.tiff, specify target location, and add watermark “Approved” on each thumbnail:
Copy Code
|
|
---|---|
java -jar convert2swfclient.jar source=c:\tempcache\sample.tiff target=c:\tempcache\ thumbnail=100x100 wtmtext=Approved wtmfont=Helvetica wtmsize=50 wtmalpha=70 |